package cn.bgs.mapper;

import cn.bgs.CommunityManagement.pojo.Community;
import cn.bgs.pojo.CommunityActivities;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ActivityMapper {
    List<CommunityActivities> selectAll(String activityTheme);


    @Select("SELECT community_id,community_name FROM community_communitymanagement.community")
    @Results(
            {@Result(property = "communityId", column = "community_id"),
                @Result(property = "communityName", column = "community_name")})
    List<Community> middle();

    int activityAdd(CommunityActivities communityActivities);

    int activityUpdate(CommunityActivities communityActivities);

    int activityDelect(Integer communityActivitiesId);
}
